﻿using System;
using System.Windows.Forms;
using TextBox;

namespace MS_UI
{
    public partial class FrmParamSet : Form
    {
        public FrmParamSet()
        {
            InitializeComponent();
        }

        private void ModifyTxt_UserControlClick(object sender, EventArgs e)
        {
            if (sender is TextBox.TextBox)
            {
                TextBox.TextBox item = (TextBox.TextBox)sender;
                string InitialValue = item.ActualValue;
                string Variable = string.Empty;
                string Address = string.Empty;
                if (item.Tag != null)
                {
                    Variable = item.Tag.ToString();
                }
                if (CommonMethod.CurrentVarAddress.ContainsKey(Variable))
                {
                    Address = CommonMethod.CurrentVarAddress[Variable];
                }
                FrmParaModify objFrm = new FrmParaModify(InitialValue, Address);
                objFrm.ShowDialog();
            }
        }
    }
}
